const localStorage = window.localStorage

export default {
  name: 'localStorage',
  set (key, value) {
    localStorage.setItem(key, JSON.stringify(value))
  },
  get (key) {
    localStorage.getItem(key)
  },
  getParse (key) {
    return JSON.parse(localStorage.getItem(key)) || null
  },
  remove (key) {
    localStorage.removeItem(key)
  }
}
